package com.example.demo.controller;

import com.example.demo.common.MyTimer;
import com.example.demo.common.PasswordTool;
import com.example.demo.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Timer;
import java.util.TimerTask;

@RestController
public class test {
    @Autowired
    private OrderMapper ordorMapper;

    @RequestMapping("/test")
    public String test() {
        Timer timer = MyTimer.timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("计时器");
            }
        }, 20000);
        return "hhhh";
    }

    public static void main(String[] args) {
        PasswordTool.encrypt("123");
        System.out.println(PasswordTool.encrypt("123"));
    }

}

